package com.charity.mapper;

import com.charity.domain.CharityBox;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface ICharityBoxMapper {
    int insertCharityBox(CharityBox charityBox);
    
    int updateCharityBox(CharityBox charityBox);
    
    int deleteCharityBox(Long boxId);
    
    CharityBox selectCharityBoxById(Long boxId);
    
    List<CharityBox> selectCharityBoxList(@Param("status") Integer status, 
                                         @Param("category") String category,
                                         @Param("pageNum") int pageNum, 
                                         @Param("pageSize") int pageSize);
    
    List<String> selectItemCategories();
    
    int donateItem(CharityBox item);
    
    int receiveItem(@Param("itemId") Long itemId, 
                    @Param("userId") Long userId, 
                    @Param("reason") String reason);
    
    List<CharityBox> selectItemList(@Param("status") Integer status, 
                                   @Param("category") String category,
                                   @Param("pageNum") int pageNum, 
                                   @Param("pageSize") int pageSize);
}